<template>
	<div>
		<textarea class="txt" @input="onInput" rows="1" autofocus></textarea>
	</div>
</template>

<script setup>
const onInput = (e) => {
	const el = e.target;
	el.style.height = 'auto'
	el.style.height = `${el.scrollHeight}px`
}
</script>
<style lang='less' scoped></style>
